<?php
class Controller_Admin_ThirdMarket extends Controller_Template 
{
    public function __construct($req, $res) {
		parent::__construct($req, $res);
		$this->template = "smarty:admin/thirdmarket/paiqi";
	}
	
	public function action_paiqi()
	{
	    $market_list = array('xiaomi', 'wandoujia', '360', '91', 'uc');
	    $query = $this->request->query();
	    $date = Arr::get($query, 'date', date('Y-m-d'));
	    $market = Arr::get($query, 'market', '');
	    $list = ThirdMarket::paiqi($date, $market);
	    $this->template->set_filename('smarty:admin/thirdmarket/paiqi');
	    $this->template->set('list', $list);
	    $this->template->set('date', $date);
	    $this->template->set('market', $market);
	    $this->template->set('market_list', $market_list);
	}
	
	
}
